export interface ChatMessage {
    id: number;
    type: 'sent' | 'received';
    content: string;
    timestamp: string;
    isProduct?: boolean;
    isPurchaseRequest?: boolean;
    product?: {
        name: string;
        price: string;
        image: string;
        purchaseRequestId?: number;
        purchaseRequestName?: string;
    };
    isNew?: boolean;
}

export interface ChatConversation {
    id: number;
    partnerId: number;
    partnerName: string;
    partnerAvatar: string;
    lastMessage: {
        id: number;
        conversationId: number;
        senderId: number;
        receiverId: number;
        content: string;
        type: string;
        createdAt: string;
        status: string;
    };
    unreadCount: number;
    updatedAt: string;
    school?: string;
    phone?: string;
    region?: string;
    introduction?: string;
    productId?: number;
    productTitle?: string;
    productThumbnail?: string;
}

export interface ApiChatMessage {
    id: number;
    conversationId: number;
    senderId: number;
    receiverId: number;
    content: string;
    createdAt: string;
    type?: string;
    status?: string;
    productId?: number;
    purchaseRequestId?: number;
    purchaseRequestName?: string;
    productInfo?: {
        title?: string;
        name?: string;
        price?: string | number;
        image?: string;
        images?: string[];
    };
} 